<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<header th:replace="admin/header::headerFragment(${title},${active})"></header>
<body class="fixed-left">
<div id="wrapper">
    <div th:replace="admin/header::header-body"></div>
    <div class="content-page">
        <div class="content">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12">
                        <h4 class="page-title">MyStory仪表盘</h4>
                    </div>

                    <div class="row">
                        <div class="col-sm-6 col-lg-3">
                            <div class="mini-stat clearfix bx-shadow bg-info">
                                <span class="mini-stat-icon"><i class="fa fa-quote-right" aria-hidden="true"></i></span>
                                <div class="mini-stat-info text-right">
                                    发表了<span class="counter" th:text="${statistics.articles}"></span>篇文章
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6 col-lg-3">
                            <div class="mini-stat clearfix bg-purple bx-shadow">
                                <span class="mini-stat-icon"><i class="fa fa-comments-o" aria-hidden="true"></i></span>
                                <div class="mini-stat-info text-right">
                                    收到了<span class="counter" th:text="${statistics.comments}"></span>条留言
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-6 col-lg-3">
                            <div class="mini-stat clearfix bg-success bx-shadow">
                                <span class="mini-stat-icon"><i class="fa fa-cloud-upload" aria-hidden="true"></i></span>
                                <div class="mini-stat-info text-right">
                                    上传了<span class="counter" th:text="${statistics.attachs}"></span>个附件
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="row">
                        <div class="col-md-4">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">最新文章</h4>
                                </div>
                                <div class="panel-body">
                                    <ul class="list-group">
                                        <li class="list-group-item" th:each="article : ${articles}">
                                            <span class="badge badge-primary" th:title="${article.commentsNum}+'条评论'" th:text="${article.commentsNum}"></span>
                                            <a target="_blank" th:href="${commons.site_url('/article/')}+${article.cid}+'/1'" th:text="${article.title}"></a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">最新留言</h4>
                                </div>

                                <div class="panel-body">

                                    <div th:if="${comments}== null and ${#lists.size(comments)}==0">
                                        <div class="alert alert-warning">
                                            还没有收到留言.
                                        </div>
                                    </div>

                                    <ul class="list-group"  th:unless="${comments}==null and ${#lists.size(comments)}==0">
                                        <li class="list-group-item" th:each="comment : ${comments}">
                                            <div th:if="${comment.url}!=null and ${comment.url}!=''">
                                                <a th:href="@{${comment.url}}" target="_blank" th:text="${comment.author}"></a>
                                            </div>
                                            <th:block th:unless="${comment.url}!=null and ${comment.url}!=''" th:text="${comment.author}"/>于
                                            <th:block th:text="${commons.fmtdate(comment.created,'MM月dd日HH:mm')}"/>:
                                            <a th:href="${commons.site_url('/article/')}+${comment.cid}+'#comments'"
                                                target="_blank" th:utext="${commons.article(comment.content)}">
                                            </a>
                                        </li>
                                    </ul>

                                </div>

                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">系统日志</h4>
                                </div>
                                <div class="panel-body">
                                    <ul class="list-group">
                                        <li class="list-group-item">
                                            <span>系统日志1</span>
                                        </li>
                                        <li class="list-group-item">
                                            <span>系统日志2</span>
                                        </li>
                                        <li class="list-group-item">
                                            <span>系统日志3</span>
                                        </li>
                                        <li class="list-group-item">
                                            <span>系统日志4</span>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div th:replace="admin/footer :: footer-content"></div>
            </div>
        </div>
    </div>
</div>
<div th:replace="admin/footer :: footer"></div>
</body>
</html>

















